package com.ruoyi.cderp.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购订单对象 tbl_purchase_order
 * 
 * @author ruoyi
 * @date 2025-02-18
 */
public class TblPurchaseOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private String id;

    /** 单号 */
    @Excel(name = "单号")
    private String code;

    /** 仓库ID */
    @Excel(name = "仓库ID")
    private String scId;

    /** 仓库编号 */
    @Excel(name = "仓库编号")
    private String scCode;

    /** 仓库名称 */
    @Excel(name = "仓库名称")
    private String scName;

    /** 供应商ID */
    @Excel(name = "供应商ID")
    private String supplierId;

    /** 供应商编号 */
    @Excel(name = "供应商编号")
    private String supplierCode;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 采购员ID */
    @Excel(name = "采购员ID")
    private String purchaserId;

    /** 采购员名称 */
    @Excel(name = "采购员名称")
    private String purchaserName;

    /** 预计到货日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预计到货日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date expectArriveDate;

    /** 采购数量 */
    @Excel(name = "采购数量")
    private Long totalNum;

    /** 赠品数量 */
    @Excel(name = "赠品数量")
    private Long totalGiftNum;

    /** 采购金额 */
    @Excel(name = "采购金额")
    private BigDecimal totalAmount;

    /** 备注 */
    @Excel(name = "备注")
    private String description;

    /** 创建人ID */
    @Excel(name = "创建人ID")
    private String createById;

    /** 修改人ID */
    private String updateById;

    /** 审核人 */
    @Excel(name = "审核人")
    private String approveBy;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date approveTime;

    /** 状态 */
    @Excel(name = "状态")
    private Long status;

    /** 拒绝原因 */
    private String refuseReason;


    /** 采购订单明细信息 */
    private List<TblPurchaseOrderDetail> tblPurchaseOrderDetailList;

    //约定支付方式
    private List<TblOrderPayType> tblOrderPayTypeList;

    public List<TblOrderPayType> getTblOrderPayTypeList() {
        return tblOrderPayTypeList;
    }

    public void setTblOrderPayTypeList(List<TblOrderPayType> tblOrderPayTypeList) {
        this.tblOrderPayTypeList = tblOrderPayTypeList;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setScId(String scId) 
    {
        this.scId = scId;
    }

    public String getScId() 
    {
        return scId;
    }
    public void setSupplierId(String supplierId) 
    {
        this.supplierId = supplierId;
    }

    public String getSupplierId() 
    {
        return supplierId;
    }
    public void setPurchaserId(String purchaserId) 
    {
        this.purchaserId = purchaserId;
    }

    public String getPurchaserId() 
    {
        return purchaserId;
    }
    public void setExpectArriveDate(Date expectArriveDate) 
    {
        this.expectArriveDate = expectArriveDate;
    }

    public Date getExpectArriveDate() 
    {
        return expectArriveDate;
    }
    public void setTotalNum(Long totalNum) 
    {
        this.totalNum = totalNum;
    }

    public Long getTotalNum() 
    {
        return totalNum;
    }
    public void setTotalGiftNum(Long totalGiftNum) 
    {
        this.totalGiftNum = totalGiftNum;
    }

    public Long getTotalGiftNum() 
    {
        return totalGiftNum;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }
    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }
    public void setCreateById(String createById) 
    {
        this.createById = createById;
    }

    public String getCreateById() 
    {
        return createById;
    }
    public void setUpdateById(String updateById) 
    {
        this.updateById = updateById;
    }

    public String getUpdateById() 
    {
        return updateById;
    }
    public void setApproveBy(String approveBy) 
    {
        this.approveBy = approveBy;
    }

    public String getApproveBy() 
    {
        return approveBy;
    }
    public void setApproveTime(Date approveTime) 
    {
        this.approveTime = approveTime;
    }

    public Date getApproveTime() 
    {
        return approveTime;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setRefuseReason(String refuseReason) 
    {
        this.refuseReason = refuseReason;
    }

    public String getRefuseReason() 
    {
        return refuseReason;
    }

    public List<TblPurchaseOrderDetail> getTblPurchaseOrderDetailList()
    {
        return tblPurchaseOrderDetailList;
    }

    public void setTblPurchaseOrderDetailList(List<TblPurchaseOrderDetail> tblPurchaseOrderDetailList)
    {
        this.tblPurchaseOrderDetailList = tblPurchaseOrderDetailList;
    }

    public String getScCode() {
        return scCode;
    }

    public void setScCode(String scCode) {
        this.scCode = scCode;
    }

    public String getScName() {
        return scName;
    }

    public void setScName(String scName) {
        this.scName = scName;
    }

    public String getSupplierCode() {
        return supplierCode;
    }

    public void setSupplierCode(String supplierCode) {
        this.supplierCode = supplierCode;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getPurchaserName() {
        return purchaserName;
    }

    public void setPurchaserName(String purchaserName) {
        this.purchaserName = purchaserName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("code", getCode())
            .append("scId", getScId())
            .append("supplierId", getSupplierId())
            .append("purchaserId", getPurchaserId())
            .append("expectArriveDate", getExpectArriveDate())
            .append("totalNum", getTotalNum())
            .append("totalGiftNum", getTotalGiftNum())
            .append("totalAmount", getTotalAmount())
            .append("description", getDescription())
            .append("createBy", getCreateBy())
            .append("createById", getCreateById())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateById", getUpdateById())
            .append("updateTime", getUpdateTime())
            .append("approveBy", getApproveBy())
            .append("approveTime", getApproveTime())
            .append("status", getStatus())
            .append("refuseReason", getRefuseReason())
            .append("tblPurchaseOrderDetailList", getTblPurchaseOrderDetailList())
            .toString();
    }
}
